export async function saveNote(nid, content, title, currentBgColor) {
    let writeContent = ``;
    let res = await axios.get("/getDate");
    let dateStr = res.data;
    writeContent = content;
    axios.put("/notes/saveNoteByNid", {
        "nid": nid,
        "content": writeContent,
        "title": title,
        "date": dateStr,
        "backgroundColor": currentBgColor
    }).then(res => {
        if (res.data.ok === 1) {
            return true;
        } else {
            return false;
        }
    }).catch(err => {
        return false;
    })
}